package ExerciseTwo;

public class Bank {

	private Customer customer[];
	private int numberOfCustomer;
	
	public Bank()
	{
		customer = new Customer[10];
	}
	
	//添加客户
	public void addCustomer(String s)
	{
		Customer cust = new Customer(s);
		customer[numberOfCustomer++] = cust;
	}
	
	//获取客户总数
	public int getNumberOfCustomer()
	{
		return numberOfCustomer;
	}
	
	//获取指定位置上的客户
	public Customer getCustomer(int index)
	{
		if(index>=0 && index<numberOfCustomer)
		{
			return customer[index];
		}
		else
		{
			return null;
		}
	}
}
